package com.kangyi.admin.mapper;

import com.kangyi.admin.annotation.AutoFill;
import com.kangyi.entity.NursingHomeService;
import com.kangyi.enumeration.OperationType;
import com.kangyi.vo.NursingHomeServiceVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Blank
 * @version 1.0
 */
@Mapper
public interface NursingHomeServiceMapper {

    @Select("select * from nursing_home_service where nursing_home_id = #{nursingHomeId}")
    List<NursingHomeServiceVO> inquiryService(Integer nursingHomeId);

    @Delete("delete from nursing_home_service where nursing_home_id = #{nursingHomeId};")
    void deleteByNursingHomeId(Integer nursingHomeId);

    @AutoFill(value = OperationType.INSERT)
    void insertBatch(List<NursingHomeService> nursingHomeServiceList);
}
